import request from '@/utils/request'

// 查询个人优惠券列表
export function listCoupons(query) {
    return request({
        url: '/passenger/coupons/list',
        method: 'get',
        params: query
    })
}

// 查询个人优惠券详细
export function getCoupons(userCouponId) {
    return request({
        url: '/passenger/coupons/' + userCouponId,
        method: 'get'
    })
}

// 新增个人优惠券
export function addCoupons(data) {
    return request({
        url: '/passenger/coupons',
        method: 'post',
        data: data
    })
}

// 修改个人优惠券
export function updateCoupons(data) {
    return request({
        url: '/passenger/coupons',
        method: 'put',
        data: data
    })
}

// 删除个人优惠券
export function delCoupons(userCouponId) {
    return request({
        url: '/passenger/coupons/' + userCouponId,
        method: 'delete'
    })
}
